<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0047)http://www3.ecmoban.com/admin/index.php?act=top -->
<html >
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台主界面</title>
<link href="css/stage.css" rel="stylesheet" type="text/css">
<link href="image/favico.ico" rel="shortcut icon" />
<link href="css/general.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery-3.1.0.js"></script>
	<script type="text/javascript">
		//跳转网页
		function main(url) {
			document.getElementById("a").src = url;
		}
		$(function() {
			$("h4").click(function() {
				$(this).next().slideToggle();
			});
		});
		function next(rand) {
			var one = document.getElementById("next_" + rand);
			if (one.style.display == "none") {
				//one.style.display = "block";
				for (var i = 1; i <= 4; i++) {
					var two = document.getElementById("next_" + i);
					if (two != one) {
						two.style.display = "none";
					}
				}
			}
		}
	
		//弹出隐藏层
		function ShowDiv(show_div,bg_div){
		 document.getElementById(show_div).style.display='block';
		 document.getElementById(bg_div).style.display='block' ;
		 var bgdiv = document.getElementById(bg_div);
		 bgdiv.style.width = document.body.scrollWidth; 
		 // bgdiv.style.height = $(document).height();
		 $("#"+bg_div).height($(document).height());
		};
		//关闭弹出层
		function CloseDiv(show_div,bg_div)
		{
		 document.getElementById(show_div).style.display='none';
		 document.getElementById(bg_div).style.display='none';
		};
		function update(){
			var id=$("input[name=id]").val();
			var pwd=$("input[name=pwd]").val();
			var a=$("#pwd1").val();
			var b=$("#pwd2").val();
			var c=$("#pwd3").val();
	
			if(pwd != a){
				alert("旧密码密码错误");
				return false;
			}else if(b == '' || c == ''){
				alert("密码为空");
				return false;
			}else if(b != c){
				alert("新密码两次输入不一致");
				return false;
			}else{
				$.post("UpPassWod", {id: id, pwd: b}, function(){
					 alert("密码修改成功，请重新登陆");
					 document.location="login.jsp";
				 });
			}
		}
	</script>
	<style type="text/css">

	</style>
<style>
.black_overlay{
 display: none;
 position: absolute;
 top: 0%;
 left: 0%;
 width: 100%;
 height: 100%;
 background-color: black;
 z-index:1001;
 -moz-opacity: 0.8;
 opacity:.80;
 filter: alpha(opacity=80);
}
.white_content {
 display: none;
 position: absolute;
 top: 30%;
 left: 30%;
 width: 40%;
 height: 40%;
 border: 1px solid lightblue;
 background-color: #eee;
 z-index:1002;

}
.t1{
	color:black;
}

input.button {
    padding: 5px 15px 5px;
    margin: 2px 2px;
    border: none;
    background: #0099FF;
    color: #FFF;
    cursor: pointer;
    border-radius: 3px;
}
.jz{
	margin: 0px auto;
}
td{
	padding-bottom: 15px;
}
</style>
</head>
<body>
<div id="fade" class="black_overlay">
</div>
 <div id="MyDiv" class="white_content">
  <div style="text-align: right; cursor: default; height: 40px;">
   <span style="font-size: 16px;" onclick="CloseDiv('MyDiv','fade')"><input class="button" type="button" value="X"></span>
  </div>
	<form action="" class="t1" onsubmit="return update(123456)">
	<table class="jz">
	<tr>
		<td>用户名：</td>
		<td><input type="txt" id="name" value="${tag[0].memberUser}"></td>
	</tr>
	<tr>
		<td>旧密码：</td>
		<td><input type="password" id="pwd1"></td>
	</tr>
	<tr>
		<td>新密码：</td>
		<td><input type="password" id="pwd2"></td>
	</tr>
	<tr>
		<td>确认密码：</td>
		<td><input type="password" id="pwd3"></td>
	</tr>
	<tr>
		<td colspan="2" align="center">
		<input type="submit" value="确定" class="button">
		<input type="reset" value="重置" class="button">
		</td>
	</tr>	
	</table>
	</form>
 </div>
	<div class="t2">
		<div id="header-div">
			<div id="logo-div" style="bgcolor: #000000;">
				<img src="image/登陆界面/x1.png">
				<div class="t4"><h3>小熊猫购物系统</h3></div>
				<input type="hidden" name="id" value="${tag[0].memberId}">
				<input type="hidden" name="user" value="${tag[0].memberUser}">
				<input type="hidden" name="pwd" value="${tag[0].memberPassword}">
			</div>
			<div id="license-div" style="bgcolor: #000000;"></div>
			<div id="submenu-div">
				<ul>
					<li><a href="login.jsp"><img
							src="image/后台图片/topmune_08.png" style="border: none;"><span>退出</span></a></li>
					<li><a><img src="image/后台图片/qingchu.png"
							style="border: none;"><span>清除缓存</span></a></li>
					<li><a onclick="ShowDiv('MyDiv','fade')"><img src="image/后台图片/修改密码.png"
							style="border: none;"><span>修改密码</span></a></li>
					<li><a href="BackStage"><img src="image/后台图片/topmune_03.png"
							style="border: none;"><span>刷新</span></a></li>
					<li><a href="Product" target="_Blank"><img src="image/后台图片/topmune_06.png"
							style="border: none;"><span>查看网店</span></a></li>

				</ul>
				<div id="send_info"
					style="padding: 5px 10px 0 0; clear: right; text-align: right; color: #FF9900; width: 40%; float: right; display: none;">
					<a href="http://www3.ecmoban.com/admin/index.php?act=clear_cache"
						target="main-frame" class="fix-submenu">清除缓存</a> <a
						href="http://www3.ecmoban.com/admin/privilege.php?act=logout"
						target="_top" class="fix-submenu">退出</a>
				</div>
				
			</div>
		</div>
		<div id="menu-div">
			<ul>
				<li class="fix-spacel">&nbsp;</li>
				<li style="border-left: none;"><a onclick="main('TongjituServlet')" target="main-frame"><img
						src="image/后台图片/index-11_07.png" width="17" height="18"
						style="border: none;" align="absmiddle"><span>起始页</span></a><span
					class="muneFG"></span></li>

				<li><a onclick="main('BlockProductServlet?curpage=1&pagesize=5')"><img src="image/后台图片/index-11_09.png" width="17"
						height="18" align="absmiddle"><span>商品管理</span>
						<span class="num" >${product}</span></a><span class="muneFG"></span></li>
				<li><a onclick="main('OrderServlet?curpage=1&pagesize=5')"><img src="image/后台图片/dd.png" width="15" height="18"
						align="absmiddle"><span>订单管理</span><span class="num">${order}</span></a><span
					class="muneFG"></span></li>
				<li><a onclick="main('AssessServlet?curpage=1&pagesize=5')"><img src="image/后台图片/index-11_19.png" width="17"
						height="18" align="absmiddle"><span>用户评论</span><span
						class="num">${assess}</span></a><span class="muneFG"></span></li>
				<li><a onclick="main('BlockProductServlet?curpage=1&pagesize=5')">商品列表</a></li>
				<li><a onclick="main('OrderServlet?curpage=1&pagesize=5')">订单列表</a></li>
				<li><a onclick="main('AssessServlet?curpage=1&pagesize=5')">用户评论</a></li>
				<li><a onclick="main('MemberSelect?curpage=1&pagesize=5')">会员列表</a></li>
				<li class="fix-spacer">&nbsp;</li>
			</ul>
			<br class="clear">
		</div>

		<div id="menu-list">
			<div
				style="width: 170px; height: 549px; overflow: auto; border: 0px solid #000000;">
				<p class="t3">
					<span class="tab-front">导航菜单</span>
				</p>
				<ul id="menu-ul">
					<h4 class="collapse lis ico_1" onclick="next('1')">商品管理</h4>
					<ul style="display: none;" id="next_1">
						<li class="menu-item"><a onclick="main('BlockProductServlet?curpage=1&pagesize=5')"
							target="main-frame">商品列表</a></li>
						<li class="menu-item"><a onclick="main('AddProductServlet')"
							target="main-frame">添加新商品</a></li>
						<li class="menu-item"><a onclick="main('RecoveryAll?curpage=1&pagesize=5')"
							target="main-frame">商品回收站</a></li>
						<li class="menu-item"><a onclick="main('Putlistservlet?curpage=1&pagesize=5')"
							target="main-frame">上架商品列表</a></li>
						<li class="menu-item"><a onclick="main('OffMenu?curpage=1&pagesize=5')"
							target="main-frame">下架商品列表</a></li>
						<li class="menu-item"><a onclick="main('AssessServlet?curpage=1&pagesize=5')"
							target="main-frame">评价列表</a></li>
						<li class="menu-item"><a onclick="main('BrandSerclet?curpage=1&pagesize=5')"
							target="main-frame">品牌列表</a></li>
						<li class="menu-item"><a onclick="main('addbrand.jsp')"
							target="main-frame">添加新品牌</a></li>
					</ul>

					<h4 class="collapse lis ico_3" onclick="next('2')">订单管理</h4>
					<ul style="display: none;" id="next_2">
						<li class="menu-item"><a onclick="main('OrderServlet?curpage=1&pagesize=5')"
							target="main-frame">订单列表</a></li>
						<li class="menu-item"><a onclick="main('SendOrderMenu?curpage=1&pagesize=5')"
							target="main-frame">发货单列表</a></li>
						<li class="menu-item"><a onclick="main('RtOrder?curpage=1&pagesize=5')"
							target="main-frame">退货单列表</a></li>
					</ul>
					<h4 class="collapse lis ico_7" onclick="next('3')">会员管理</h4>
					<ul style="display: none;" id="next_3">
						<li class="menu-item"><a onclick="main('MemberSelect?curpage=1&pagesize=5')"
							target="main-frame">会员列表</a></li>
						<li class="menu-item"><a onclick="main('AdminServlet?curpage=1&pagesize=5')"
							target="main-frame">管理员列表</a></li>
						<li class="menu-item"><a
							onclick="main('addAdministrators.jsp')" target="main-frame">注册管理员</a></li>
					</ul>
					<li class="collapse lis ico_9"></li>
			</div>
			</ul>
		</div>
		<div>
			<div
				style="height: 547px; overflow: auto; border: 1px solid #000000;">
				<iframe class="t1" id="a" name="aaa" src="TongjituServlet"></iframe>
			</div>
		</div>                                          
	</div>
	
</body>
</html>